namespace NetSpell.SpellChecker.Dictionary.Phonetic
{
    using System;

    /// <summary>
    ///     A strongly typed enumerator for 'PhoneticRuleCollection'
    /// </summary>
    public class PhoneticRuleEnumerator : object, System.Collections.IEnumerator
    {
        #region Fields

        private System.Collections.IEnumerator Base;
        private System.Collections.IEnumerable Local;

        #endregion Fields

        #region Constructors

        /// <summary>
        ///     Enumerator constructor
        /// </summary>
        public PhoneticRuleEnumerator(PhoneticRuleCollection mappings)
        {
            this.Local = ((System.Collections.IEnumerable)(mappings));
            this.Base = Local.GetEnumerator();
        }

        #endregion Constructors

        #region Properties

        /// <summary>
        ///     Gets the current element from the collection (strongly typed)
        /// </summary>
        public PhoneticRule Current
        {
            get
            {
                return ((PhoneticRule)(Base.Current));
            }
        }

        /// <summary>
        ///     Gets the current element from the collection
        /// </summary>
        object System.Collections.IEnumerator.Current
        {
            get
            {
                return Base.Current;
            }
        }

        #endregion Properties

        #region Methods

        /// <summary>
        ///     Advances the enumerator to the next element of the collection
        /// </summary>
        public bool MoveNext()
        {
            return Base.MoveNext();
        }

        /// <summary>
        ///     Sets the enumerator to the first element in the collection
        /// </summary>
        public void Reset()
        {
            Base.Reset();
        }

        /// <summary>
        ///     Advances the enumerator to the next element of the collection
        /// </summary>
        bool System.Collections.IEnumerator.MoveNext()
        {
            return Base.MoveNext();
        }

        /// <summary>
        ///     Sets the enumerator to the first element in the collection
        /// </summary>
        void System.Collections.IEnumerator.Reset()
        {
            Base.Reset();
        }

        #endregion Methods
    }
}